class BaseMiddleware(object):
   
    def process_request(self, request):
        raise NotImplementedError('process_request must be rewritten')
    
    def process_response(self, request, response):
        raise NotImplementedError('process_response must be rewritten')
